@import '~antd/es/style/variable.less';

html,
body,
#root {
  height: 100%;
}
#root > div:first-child {
  height: 100%;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
  left: unset;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

// Compatible with IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}

// 全局资源加载loading
.loading_container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding-top: 20%;
  text-align: center;
}

// pagination 样式
.ant-pagination-item-active {
  border-radius: 4px;
}

// 滚动条
body,
div,
section,
ul {
  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background-color: #fff;
  }
  &::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.25);
  }
  &::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    -webkit-box-shadow: inset 0 0 5px rgb(222, 222, 222, 0.25);
  }
  &::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.1);
  }
}

// 自定义框架布局
.system-with-menu-render-collapsed
  .ant-pro-basicLayout-side
  .ant-pro-fixed-header:not(.ant-pro-top-menu) {
  width: calc(100% - 60px) !important;
}
.ant-pro-basicLayout-mix,
.ant-pro-basicLayout-side {
  &.screen-md,
  &.screen-lg,
  &.screen-xl,
  &.screen-xxl {
    section.ant-layout {
      flex-direction: row;
      .ant-layout {
        width: 0;
      }
    }
  }
}
main.ant-layout-content {
  padding: 20px 20px 0 20px;
  overflow-x: hidden;
}
.ant-layout-header {
  position: relative;
  height: 82px !important;
  background: transparent !important;
  pointer-events: none;
}
.ant-pro-global-header {
  z-index: 10;
  box-shadow: 4px 1px 4px rgba(36, 37, 37, 0.15);
  pointer-events: auto;
}
.ant-pro-header-realDark {
  box-shadow: unset !important;
}

// 通用表格的非固定列拖拽样式
.common-table-column-dragging {
  z-index: 1030;
  overflow: hidden;
  background-color: @component-background;
  box-shadow: 0 0 4px @text-color-secondary;
}

// 触发tooltip提示的图标字体样式
.tooltip-information-handle-icon {
  margin: 0 6px;
  color: @text-color-secondary;
  cursor: pointer;
}

// 表格内单元格的表单控件提示调整
.ant-table-tbody > tr > td {
  .ant-form-item-explain,
  .ant-form-item-extra {
    position: relative;
    top: -6px;
    font-size: 12px;
  }
}

// 页面设计器内组件样式
.component-designer-item {
  position: relative;
  z-index: 1;
  &:after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    border: 1px solid transparent;
    content: '';
  }
}
.component-designer-hovered {
  &:after {
    border: 1px dashed @blue-7;
  }
  &:after:hover {
    border: 1px dashed @blue-7;
  }
}
.component-designer-selected {
  &:after {
    border: 1px solid @blue-7;
  }
  &:after:focus {
    border: 1px solid @blue-7;
  }
}
